<?php
/**
 * CreateTime: 2023/11/21 14:38
 * User:LinQ
 */

namespace Database\Seeders\Database;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class UserRoleSeeder  extends Seeder
{
    public function run()
    {
        $isExists = DB::table('user_role')->select('user_role_id')->first();
        if(!$isExists){
            DB::table('user_role')->insert(
                [
                    'role_id' => 1,
                    'user_id' => 1,
                    'created_at' => date("Y-m-d h:i:s"),
                    'updated_at' => date("Y-m-d h:i:s"),
                ]
            );
        }
    }
}